<?php
declare (strict_types=1);

namespace app\common\model;

class News extends Base
{
    protected $name = 'news';

    public function getTypeAttr($value)
    {
        return self::typeName($value);
    }
    public static function typeName($value){
        return match ($value) {
            1 => '系统公告',
            2 => '新手指南',
            3 => '常见问题',
            default => '系统公告'
        };
    }

    public function getContentAttr($value)
    {
        return htmlspecialchars_decode($value);
    }


}
